Skip to content

feat(telemetry): persist total_equity for live return series#214

Merged
Pigbibi merged 2 commits into
mainfrom
feat/task5-telemetry-equity
Jul 9, 2026
Merged

feat(telemetry): persist total_equity for live return series#214
Pigbibi merged 2 commits into
mainfrom
feat/task5-telemetry-equity

Conversation

@Pigbibi

@Pigbibi Pigbibi commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Summary

  • platform execution telemetry 增加 total_equity
  • 配合 QPK ReturnCollector live run → 日收益聚合(任务 5)

Depends on

Test plan

  • CI test + gate

Made with Cursor

Persist portfolio equity snapshots so QPK ReturnCollector can derive
live daily returns for drift monitoring (task 5).

Co-Authored-By: Claude <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@cursor

cursor Bot commented Jul 9, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3601b27d48

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +744 to +745
"total_equity": (result.get("portfolio") or {}).get("total_equity")
or (result.get("portfolio") or {}).get("equity"),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve zero-valued total_equity in telemetry

When the portfolio's total_equity is exactly 0.0 (for example the existing zero-equity strategy-cycle path), this or treats it as absent and falls back to portfolio.get("equity"), which is normally unset, so the execution telemetry records None instead of the real zero. That defeats the new live return series field for empty/small accounts and can make the collector drop or misinterpret a valid datapoint; check key presence or is not None instead of truthiness.

Useful? React with 👍 / 👎.

Co-authored-by: Cursor <cursoragent@cursor.com>
@cursor

cursor Bot commented Jul 9, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@Pigbibi Pigbibi merged commit 86cfbca into main Jul 9, 2026
2 checks passed
@Pigbibi Pigbibi deleted the feat/task5-telemetry-equity branch July 9, 2026 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant